package com.empire.module.member.dal.mysql.warnconfigpersonrelation;

import java.util.*;

import com.empire.framework.common.pojo.PageResult;
import com.empire.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.empire.framework.mybatis.core.mapper.BaseMapperX;
import com.empire.module.member.dal.dataobject.warnconfigpersonrelation.WarnConfigPersonRelationDO;
import org.apache.ibatis.annotations.Mapper;
import com.empire.module.member.controller.admin.warnconfigpersonrelation.vo.*;

/**
 * 预警条件-人员关系 Mapper
 *
 * @author 主席大人
 */
@Mapper
public interface WarnConfigPersonRelationMapper extends BaseMapperX<WarnConfigPersonRelationDO> {

    default PageResult<WarnConfigPersonRelationDO> selectPage(WarnConfigPersonRelationPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WarnConfigPersonRelationDO>()
                .eqIfPresent(WarnConfigPersonRelationDO::getWarnConfigId, reqVO.getWarnConfigId())
                .eqIfPresent(WarnConfigPersonRelationDO::getPersonId, reqVO.getPersonId())
                .betweenIfPresent(WarnConfigPersonRelationDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WarnConfigPersonRelationDO::getId));
    }

}